/*******************************************************************************
 * Package: com.hngtrust.iir.elk.exception
 * Type:    ElkErrorType
 * Date:    2021/04/14 14:37
 *
 * Copyright (c) 2020 HUANENG GUICHENG TRUST CORP.,LTD All Rights Reserved.
 *
 * You may not use this file except in compliance with the License.
 *******************************************************************************/
package com.hngtrust.iir.elk.exception;

import com.hngtrust.framework.exception.ErrorType;

/**
 *
 * 错误信息枚举类
 * @author Zhangkangkang
 * @date 2021/04/14 14:37
 */
public enum ElkErrorType implements ErrorType {
    ELK_URL_INDEX_BLANK("ELK的请求地址:{0}或者索引:{1}不存在"),
    ELK_SEARCH_INDEX_EXCEPTION("ELK请求检索地址:{0}异常"),
    ELK_SEARCH_CONTENT_NULL("ELK检索返回内容为空"),
    ELK_SEARCH_CONTENT_ANALYSIS_EXCEPTION("ELK检索返回内容解析异常"),
    ELK_SEARCH_TIME_OUT("ELK检索返回超时"),
    ELK_SEARCH_CONTENT_BLANK("ELK检索返回的{0}为空"),
    ELK_SEARCH_TAGS_ID_NULL("ELK修改标签ID为空"),
    ELK_SEARCH_GETDOC_ERROR("ELK通过索引ID获取原文档失败"),
    Elk_SEARCH_GETDOC_NULL("ELK通过索引ID获取源文档不存在"),
    Elk_SEARCH_GETDOC_UPDATE_ERROR("ELK修改文档标签错误"),
    ELK_SEARCH_DATE_NULL("开始日期和结束日期不能为空"),
    ELK_DELETE_EXCEPTION("ELK删除失败")
            ;
    /**
     * 错误信息
     */
    private final String message;
    
    /**
     * 构造方法
     * @param message 错误信息
     */
    private ElkErrorType(String message) {
        this.message = message;
    }
    @Override
    public String getMessage(){return this.message;}
}
